<template>
	<view class="cell">
		<view class="cell-item">
            <view class="cell-item-title">Cell单独使用</view>
            <view>
                <jk-cell title="title"></jk-cell>
                <jk-cell title="title" is-link="true"></jk-cell>
                <jk-cell title="跳转到首页" is-link="true" :url="indexPath"></jk-cell>
                <jk-cell title="点击箭头跳转到首页" is-link="true" :only-tap-footer="true" :url="indexPath"></jk-cell>
                <jk-cell title="开关">
                    <jk-switch slot="footer" checked />
                </jk-cell>
            </view>
        </view>
        <view class="cell-item">
            <view class="cell-item-title">Cell配合CellGroup使用</view>
            <view>
                <jk-cell-group>
                    <jk-cell title="title"><jk-switch slot="footer" checked /></jk-cell>
                    <jk-cell title="title" is-link="true"></jk-cell>
                </jk-cell-group>
            </view>
        </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				indexPath: '../index/index'
			};
		},
        methods: {
            test(){
                uni.redirectTo()
            }
        }
	}
</script>

<style lang="scss">
.cell{
    &-item{
        margin-top: 20px;
        &-title{
            font-size: 14px;
            color: #333;
            line-height: 2em;
            padding: 5px 10px;
        }
    }
}
</style>
